home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
univspl
/
form.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1999-02-02
|
1KB
|
37 lines
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "fftmain.h"
#include "form.h"
#include "ViewUnit.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TMainForm *MainForm;
float fftmain(long sample_rate, long fft_size, float freq);
//---------------------------------------------------------------------------
__fastcall TMainForm::TMainForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::ComputeClick(TObject *Sender)
{
float found_freq;
found_freq=fftmain(StrToInt(SRateEdit->Text),StrToInt(FFTSizeEdit->Text),
StrToFloat(FreqEdit->Text));
FoundFreqLbl->Caption=FloatToStr(found_freq);
ViewForm->Invalidate();
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::Button1Click(TObject *Sender)
{
Application->Terminate();
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::ViewBtnClick(TObject *Sender)
{
ViewForm->Show();
}
//---------------------------------------------------------------------------